package com.poi.demopoi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.poi.demopoi.controller.EmployeeDTO2;
import com.poi.demopoi.domain.Employee;
import com.poi.demopoi.domain.EmployeeDto;
import com.poi.demopoi.domain.EmployeeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lx
 * @since 2020-06-03
 */
//@Repository
public interface EmployeeMapper extends BaseMapper<Employee> {

//    static void insertAll(List<Employee> l, Long companyId) {
//    }

    /**
     * 分页查询
     * @param queryDTO
     * @return NoticeEntity
     */
    List<Employee> queryByPage(Page page, @Param("query") EmployeeDTO2 queryDTO);


    public List<Employee> selectEmployeePagesRuoyi(Employee tOperator);



    /**
     * 分页查询用户信息（含角色）
     *
     * @param page      分页
     * @param userDTO   查询参数
     * @  dataScope
     * @return list
     */
    IPage<Employee> getUserVosPage(Page page, @Param("query") Employee userDTO);

    List<EmployeeVO> findPagesLogical(@Param("query") EmployeeDto dto, @Param("start") int start, @Param("end") int end);

//    int updateTItemSkuByEditItemBatch(@Param("skus") List<TItemSku> list);
    int batchUpdateList(@Param("userList")  List<Employee> userList);
    int batchSaveList(@Param("userList")  List<Employee> userList);
}
